<?php
/**
 * Author: Lee ligangmingx@gmail.com
 * DateTime: 2015/10/21 22:19
 */
function getFromApi($action,$param=array(),$type='pubwin'){
    $curl=new \Curl\Curl();
    if($type=='pubwin'){
        $api_host=Config::get('wechat.api_host');
    }else if($type=='phonecode'){
        $api_host=config::get('wechat.phonecode_host');
    }
    $request_url=$api_host.$action;
    return $curl->get($request_url,$param);
}

